package com.demo.study.java.abstractTest;

import java.util.List;

/**
 * OracleCreateTableStatement 子类
 */
class OracleCreateTableStatement extends CreateTableStatement {

    public OracleCreateTableStatement(String database, String table, List<String> columns) {
        super(database, table, columns);
    }

    @Override
    public String generateCreateTableStatement() {
        StringBuilder createTableStatement = new StringBuilder();
        createTableStatement.append("CREATE TABLE ");
        createTableStatement.append(database);
        createTableStatement.append(".");
        createTableStatement.append(table);
        createTableStatement.append(" (");
        createTableStatement.append(formatColumns());
        createTableStatement.append(")");
        createTableStatement.append(" TABLESPACE my_tablespace"); // Add Oracle-specific options
        return createTableStatement.toString();
    }
}